package com.ruoyi.project.cms.task.mapper;

import com.ruoyi.project.cms.task.domain.Assignment;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.Date;
import java.util.List;

public interface AssignmentMapper {
    List<Assignment> selectMore(Assignment assignment,String roleName);

    int insert(Assignment assignment);

    Assignment selectOne(int id);

    int updateAssignment(Assignment assignment);

    /**
     * 删除【请填写功能名称】
     *
     * @param id 【请填写功能名称】ID
     * @return 结果
     */
    int deleteAssignmentById(int id);

    /**
     * 批量删除【请填写功能名称】
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    int deleteAssignmentByIds(String[] ids);

    @Select("select user_id as uid from sys_user where user_name = #{user_name}")
    Assignment findOne(String user_name);


    @Select("select * from assignment where title = #{param1}")
    Assignment select(String title);

    @Update("update assignment set endDate = #{param1} ")
    int update(Date endDate);
}
